package com.atguigu.controller;

import com.atguigu.client.ProductFeignClient;
import com.atguigu.client.SearchFeignClient;
import com.atguigu.result.RetVal;
import com.atguigu.search.SearchParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class WebLoginController {

    @GetMapping("login.html")
    public String login(HttpServletRequest request) {
        //originalUrl记录用户从什么位置点击到登录的
        String originalUrl = request.getParameter("originalUrl");
        //我们需要在后台存储originalUrl 因为页面需要[[${originalUrl}]]
        request.setAttribute("originalUrl",originalUrl);
        //返回到登录页面
        return "login";
    }


}
